
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.CommonTmpInfoDao;
import com.insigma.business.qrcode.soldier.dto.CommonTmpInfoBSearcher;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.CommonTmpInfoDO;
import com.insigma.business.qrcode.soldier.service.CommonTmpInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("commonTmpInfoService")
public class CommonTmpInfoServiceImpl implements CommonTmpInfoService {

    @Autowired(required = false)
    private CommonTmpInfoDao commonTmpInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<CommonTmpInfoDO> search(final CommonTmpInfoBSearcher commonTmpInfoBSearcher) {
        return commonTmpInfoDao.search(commonTmpInfoBSearcher);
    }
   
    @Override
    public CommonTmpInfoDO get(final String id){
        return commonTmpInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final CommonTmpInfoDO commonTmpInfoDO){
        commonTmpInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.COMMON_TMP_INFO_ID));
        return commonTmpInfoDao.insert(commonTmpInfoDO);
    }

    
    @Override
    public Integer update(final CommonTmpInfoDO commonTmpInfoDO){
        return commonTmpInfoDao.update(commonTmpInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return commonTmpInfoDao.delete(id,modifierType,modifierId);
    }

    @Override
    public Integer realDel(String id) {
        return commonTmpInfoDao.realDel(id);
    }

}
